public class TesteReferencias {
	public static void main(String [] args) {
		Dog animal = new Dog();
		Dog animalSegundo = new Dog();
		
		animalSegundo = animal;
		animal.setName("Mailow");

		
		System.out.println(animalSegundo.getName());
		
		Dog mailowOfficial = new Dog();
		mailowOfficial = animalSegundo;
		
		System.out.println(mailowOfficial.getName());
		
		animalSegundo.setName("Sem dono");
		
		System.out.println(animal.getName());
		System.out.println(mailowOfficial.getName());
		
		
	}
}
